<?php
//================ FORMS ===================
form_pr('amlQuery', '', '', 'post');
mn_field('hidden', 'ED', 'Trigger', 'Filters', '', '', 'False', '');

mn_field('button', 'ED', 'Query', 'Consultar', '', '', '', '" style="width:100px;position:absolute;top:120px;left:490px" onclick="
	  if (document.amlQuery.SRCVALUE.value < 1) {alert(\'Indique um valor valido de consulta\');
	  } else {
	  document.amlQuery.action=\'_response/call.php?get=Compliance/a01_result\';
	  subform(\'amlQuery\',\'DepResults\');}');
mn_field('button', 'ED', 'crpPrint', 'Imprimir', '', '', '', '" style="width:100px;position:absolute;top:120px;left:605px" onclick="printdiv(\'DepResults\');');
?>

<div class="title">AML | 
    <?php mn_field('hselect', 'ED', 'ccq_type', 2, "Por niveis;Consulta Livre#1;2", '', '', '" disabled onchange="
			if (this.options[this.selectedIndex].value == 1) {
				ccq_1.style.display=\'block\';
				ccq_2.style.display=\'none\';
			} else {
				ccq_2.style.display=\'block\';
				ccq_1.style.display=\'none\';
			}'); ?></div>
<div id="src_query" class="Line" style="height:105px"></div>

<label style="position:absolute;top:80px;left:280px">Modo:</label>
<label style="position:absolute;top:40px;left:15px">Valor:</label>
<label style="position:absolute;top:63px;left:15px">Consulta:</label>
<label style="position:absolute;top:86px;left:15px">Canal:</label>
<?php
    mn_field('select', 'ED', 'SRCTYPE', '', "SELECT REF AS ID, NAME FROM hq_confreports WHERE TYPE IN ('SCREEN','PRINT') AND AREA = 1 ORDER BY TYPE DESC", '', '', '" style="width:190px;position:absolute;top:97px;left:280px');
    mn_field('hselect', 'ED', 'amqFraModo', '', ";Saida;Entrada#;1;2", '', '', '" style="width:190px;position:absolute;top:83px;left:80px');
    mn_field('select', 'ED', 'SRCID', 20, "SELECT REF AS ID, NAME FROM hq_confreports WHERE TYPE = 'SEARCH' AND AREA = 4", '', '', '" style="width:190px;position:absolute;top:60px;left:80px" onchange="
	  if (this.value == 6 || this.value == 7) { document.amlQuery.QType[2].desabled=true;}'); ?>

    <label style="position:absolute;top:38px;left:280px">Periodo:</label>
    <div style="position:absolute;top:50px;left:280px"><?php mn_field('date', 'ED', 'TimeStart', date("Y-m-01"), 'amlQuery', '8', '', ''); ?></div>
    <label style="position:absolute;top:55px;left:368px"> a </label>
    <div style="position:absolute;top:50px;left:385px"><?php mn_field('date', 'ED', 'TimeEnd', '', 'amlQuery', '8', '', ''); ?></div>

    <label style="position:absolute;top:38px;left:490px">Campos a mostrar</label>
    <label style="position:absolute;top:38px;left:650px">Agrupar por</label>
<?php mn_field('text', 'ED', 'SRCVALUE', '3000', '', '10', '', 'INPNUM" style="width:186px;position:absolute;top:38px;left:80px'); ?>
    <label style="position:absolute;top:109px;left:15px">Loja:</label>
<?php
    mn_field('select', 'ED', 'amqOrigen', '', "SELECT OriNumero AS ID, CONCAT(OriNumero,' - ',OriNombre) AS NAME FROM origenes WHERE OriTipo = 2 AND OriNumero > 800", ' ', '', '" style="width:190px;position:absolute;top:106px;left:80px');
    mn_field('mselect', 'ED', 'amqColums[]', 1, "Data;Destinatario;Montante;Remetente;Pais#1;2;3;4;5", '', '', '" size="3" style="width:150px;position:absolute;top:50px;left:490px');
    mn_field('mselect', 'ED', 'amqGroup[]', 1, "Nome;Documento;Telefone;Pais Origem;Pais Destino;Data de Nascimento#0;1;2;3;4;5", '', '', '" size="3" style="width:150px;position:absolute;top:50px;left:650px');
?>
<div id="DepResults"></div>
</form>